package cn.iocoder.yudao.module.book.dal.dataobject.records;

import lombok.*;

import java.time.LocalDate;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;

import javax.validation.constraints.PastOrPresent;

/**
 * 阅读记录 DO
 *
 * @author xi
 */
@TableName("reading_records")
@KeySequence("reading_records_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RecordsDO extends BaseDO {

    /**
     * 记录id
     */
    @TableId
    private Integer recordId;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 绘本id
     */
    private Integer bookId;
    /**
     * 绘本集id
     */
    private Integer collectionId;
    /**
     * 阅读日期
     */
    private LocalDate readingDate;
    /**
     * 阅读数量
     */
    private Integer readingCount;
    /**
     * 阅读日志
     */
    private String readingNotes;

    @PastOrPresent(message = "阅读时间不能超过当前时间")
    private LocalDateTime updateTime;

}